package com.lxw.study.structural.proxy;

public class Proxy implements Subject {
    private final RealSubject realSubject = new RealSubject();

    @Override
    public void request() {
        preRequest();
        realSubject.request();
        postRequest();
    }

    private void preRequest() {
        System.out.println("Proxy: before request.");
    }

    private void postRequest() {
        System.out.println("Proxy: after request.");
    }
}
